<?php
$percent = 100 / $count;
$percent = (int) $percent;
$percent = $percent - 1;

?>
div.horizontalInput-<?php echo $count; ?>
{
width: <?php echo $percent; ?>%;
float: left;
clear: none;
margin: 0;
}

div.horizontalInput-<?php echo $count; ?> input
{
width: auto;
}